import maya.OpenMaya as OpenMaya

num_vertex = 58
num_polygon = 1#18
num_polygon_connects = 58#54

vertex_array = OpenMaya.MFloatPointArray()
vertex_array.setLength( num_vertex )
vertex_array.set( OpenMaya.MFloatPoint(2, 2,  0), 0 )
vertex_array.set( OpenMaya.MFloatPoint(803.01, 315.72,  0), 1 )
vertex_array.set( OpenMaya.MFloatPoint(0.06695, 5,  0), 2 )
vertex_array.set( OpenMaya.MFloatPoint(507.2, 303.37,  0), 3 )
vertex_array.set( OpenMaya.MFloatPoint(0.93304, 1,  0), 4 )
vertex_array.set( OpenMaya.MFloatPoint(5, 503.08,  0), 5 )
vertex_array.set( OpenMaya.MFloatPoint(82.07, 1,  0), 6 )
vertex_array.set( OpenMaya.MFloatPoint(1, 5,  0), 7 )
vertex_array.set( OpenMaya.MFloatPoint(498.96, -139.21,  0), 8 )
vertex_array.set( OpenMaya.MFloatPoint(1, 1,  0), 9 )
vertex_array.set( OpenMaya.MFloatPoint(5, 494.85,  0), 10 )
vertex_array.set( OpenMaya.MFloatPoint(-360.51, 1,  0), 11 )
vertex_array.set( OpenMaya.MFloatPoint(2, 2,  0), 12 )
vertex_array.set( OpenMaya.MFloatPoint(497.01, -348.27,  0), 13 )
vertex_array.set( OpenMaya.MFloatPoint(0.3676, 5,  0), 14 )
vertex_array.set( OpenMaya.MFloatPoint(188.9, -354.82, 0), 15 )
vertex_array.set( OpenMaya.MFloatPoint(0.63239, 2,  0), 16 )
vertex_array.set( OpenMaya.MFloatPoint(2, 191.01,  0), 17 )
vertex_array.set( OpenMaya.MFloatPoint(-348.27, 0.74704,  0), 18 )
vertex_array.set( OpenMaya.MFloatPoint(5, -117.04,  0), 19 )
vertex_array.set( OpenMaya.MFloatPoint(-349.13, 0.25295,  0), 20 )
vertex_array.set( OpenMaya.MFloatPoint(1, 2,  0), 21 )
vertex_array.set( OpenMaya.MFloatPoint(-114.98, -348.27,  0), 22 )
vertex_array.set( OpenMaya.MFloatPoint(1, 1,  0), 23 )
vertex_array.set( OpenMaya.MFloatPoint(2, -114.98,  0), 24 )
vertex_array.set( OpenMaya.MFloatPoint(-126.93, 1,  0), 25 )
vertex_array.set( OpenMaya.MFloatPoint(1, 2,  0), 26 )
vertex_array.set( OpenMaya.MFloatPoint(-114.98, 94.39,  0), 27 )
vertex_array.set( OpenMaya.MFloatPoint(1, 1,  0), 28 )
vertex_array.set( OpenMaya.MFloatPoint(2, -114.98,  0), 29 )
vertex_array.set( OpenMaya.MFloatPoint(315.72, 1,  0), 30 )
vertex_array.set( OpenMaya.MFloatPoint(2, 2,  0), 31 )
vertex_array.set( OpenMaya.MFloatPoint(191.01, 315.72,  0), 32 )
vertex_array.set( OpenMaya.MFloatPoint(0.72471, 5,  0), 33 )
vertex_array.set( OpenMaya.MFloatPoint(-104.69, 314.75,  0), 34 )
vertex_array.set( OpenMaya.MFloatPoint(0.27528, 2,  0), 35 )
vertex_array.set( OpenMaya.MFloatPoint(2, 497.01,  0), 36 )
vertex_array.set( OpenMaya.MFloatPoint(315.72, 0.4048,  0), 37 )
vertex_array.set( OpenMaya.MFloatPoint(5, 201.25,  0), 38 )
vertex_array.set( OpenMaya.MFloatPoint(309.06, 0.59519,  0), 39 )
vertex_array.set( OpenMaya.MFloatPoint(2, 2,  0), 40 )
vertex_array.set( OpenMaya.MFloatPoint(497.01, 94.39,  0), 41 )
vertex_array.set( OpenMaya.MFloatPoint(0.36016, 5,  0), 42 )
vertex_array.set( OpenMaya.MFloatPoint(197.13, 87.76,  0), 43 )
vertex_array.set( OpenMaya.MFloatPoint(0.63984, 2,  0), 44 )
vertex_array.set( OpenMaya.MFloatPoint(2, 191.01,  0), 45 )
vertex_array.set( OpenMaya.MFloatPoint(94.39, 0.74703,  0), 46 )
vertex_array.set( OpenMaya.MFloatPoint(5, -108.8,  0), 47 )
vertex_array.set( OpenMaya.MFloatPoint(93.45, 0.25296,  0), 48 )
vertex_array.set( OpenMaya.MFloatPoint(2, 2,  0), 49 )
vertex_array.set( OpenMaya.MFloatPoint(497.01, -126.93,  0), 50 )
vertex_array.set( OpenMaya.MFloatPoint(0.36759, 5,  0), 51 )
vertex_array.set( OpenMaya.MFloatPoint(193.02, -133.52,  0), 52 )
vertex_array.set( OpenMaya.MFloatPoint(0.6324, 2,  0), 53 )
vertex_array.set( OpenMaya.MFloatPoint(2, 191.01,  0), 54 )
vertex_array.set( OpenMaya.MFloatPoint(-126.93, 0.75447, 0), 55 )
vertex_array.set( OpenMaya.MFloatPoint(5, -112.92, 0), 56 )
vertex_array.set( OpenMaya.MFloatPoint(-127.83, 0.24552, 0), 57 )


polygon_count = OpenMaya.MIntArray()
polygon_count.setLength( num_polygon )
polygon_count.set( 58, 0 )
#polygon_count.set( 3, 1 )
#polygon_count.set( 3, 2 )
#polygon_count.set( 3, 3 )
#polygon_count.set( 3, 4 )
#polygon_count.set( 3, 5 )
#polygon_count.set( 3, 6 )
#polygon_count.set( 3, 7 )
#polygon_count.set( 3, 8 )
#polygon_count.set( 3, 9 )
#polygon_count.set( 3, 10 )
#polygon_count.set( 3, 11 )
#polygon_count.set( 3, 12 )
#polygon_count.set( 3, 13 )
#polygon_count.set( 3, 14 )
#polygon_count.set( 3, 15 )
#polygon_count.set( 3, 16 )
#polygon_count.set( 3, 17 )


polygon_connects = OpenMaya.MIntArray()
polygon_connects.setLength( num_polygon_connects )
polygon_connects.set( 0, 0 )
polygon_connects.set( 1, 1 )
polygon_connects.set( 2, 2 )
polygon_connects.set( 3, 3 )
polygon_connects.set( 4, 4 )
polygon_connects.set( 5, 5 )
polygon_connects.set( 6, 6 )
polygon_connects.set( 7, 7 )
polygon_connects.set( 8, 8 )
polygon_connects.set( 9, 9 )
polygon_connects.set( 10, 10 )
polygon_connects.set( 11, 11 )
polygon_connects.set( 12, 12 )
polygon_connects.set( 13, 13 )
polygon_connects.set( 14, 14 )
polygon_connects.set( 15, 15 )
polygon_connects.set( 16, 16 )
polygon_connects.set( 17, 17 )
polygon_connects.set( 18, 18 )
polygon_connects.set( 19, 19 )
polygon_connects.set( 20, 20 )
polygon_connects.set( 21, 21 )
polygon_connects.set( 22, 22 )
polygon_connects.set( 23, 23 )
polygon_connects.set( 24, 24 )
polygon_connects.set( 25, 25 )
polygon_connects.set( 26, 26 )
polygon_connects.set( 27, 27 )
polygon_connects.set( 28, 28 )
polygon_connects.set( 29, 29 )
polygon_connects.set( 30, 30 )
polygon_connects.set( 31, 31 )
polygon_connects.set( 32, 32 )
polygon_connects.set( 33, 33 )
polygon_connects.set( 34, 34 )
polygon_connects.set( 35, 35 )
polygon_connects.set( 36, 36 )
polygon_connects.set( 37, 37 )
polygon_connects.set( 37, 38 )
polygon_connects.set( 39, 39 )
polygon_connects.set( 40, 40 )
polygon_connects.set( 41, 41 )
polygon_connects.set( 42, 42 )
polygon_connects.set( 43, 43 )
polygon_connects.set( 44, 44 )
polygon_connects.set( 45, 45 )
polygon_connects.set( 46, 46 )
polygon_connects.set( 47, 47 )
polygon_connects.set( 48, 48 )
polygon_connects.set( 49, 49 )
polygon_connects.set( 50, 50 )
polygon_connects.set( 51, 51 )
polygon_connects.set( 52, 52 )
polygon_connects.set( 53, 53 )
polygon_connects.set( 54, 54 )
polygon_connects.set( 55, 55 )
polygon_connects.set( 56, 56 )
polygon_connects.set( 57, 57 )

'''
polygon_connects.set( 10, 0 )
polygon_connects.set( 11, 1 )
polygon_connects.set( 12, 2 )

polygon_connects.set( 13, 3 )
polygon_connects.set( 12, 4 )
polygon_connects.set( 14, 5 )

polygon_connects.set( 12, 6 )
polygon_connects.set( 2, 7 )
polygon_connects.set( 14, 8 )

polygon_connects.set( 11, 9 )
polygon_connects.set( 0, 10 )
polygon_connects.set( 1, 11 )

polygon_connects.set( 14, 12 )
polygon_connects.set( 2, 13 )
polygon_connects.set( 3, 14 )

polygon_connects.set( 12, 15 )
polygon_connects.set( 1, 16 )
polygon_connects.set( 2, 17 )

polygon_connects.set( 11, 18 )
polygon_connects.set( 1, 19 )
polygon_connects.set( 12, 20 )

polygon_connects.set( 14, 21 )
polygon_connects.set( 3, 22 )
polygon_connects.set( 4, 23 )

polygon_connects.set( 15, 24 )
polygon_connects.set( 14, 25 )
polygon_connects.set( 4, 26 )

polygon_connects.set( 7, 27 )
polygon_connects.set( 5, 28 )
polygon_connects.set( 6, 29 )

polygon_connects.set( 8, 30 )
polygon_connects.set( 15, 31 )
polygon_connects.set( 7, 32 )

polygon_connects.set( 7, 33 )
polygon_connects.set( 15, 34 )
polygon_connects.set( 5, 35 )

polygon_connects.set( 9, 36 )
polygon_connects.set( 13, 37 )
polygon_connects.set( 8, 38 )

polygon_connects.set( 8, 39 )
polygon_connects.set( 13, 40 )
polygon_connects.set( 15, 41 )

polygon_connects.set( 9, 42 )
polygon_connects.set( 10, 43 )
polygon_connects.set( 13, 44 )

polygon_connects.set( 15, 45 )
polygon_connects.set( 4, 46 )
polygon_connects.set( 5, 47 )

polygon_connects.set( 13, 48 )
polygon_connects.set( 14, 49 )
polygon_connects.set( 15, 50 )

polygon_connects.set( 10, 51 )
polygon_connects.set( 12, 52 )
polygon_connects.set( 13, 53 )
'''

mesh_fn = OpenMaya.MFnMesh()
mesh_fn.create( num_vertex, num_polygon, vertex_array, polygon_count, polygon_connects )